var input = document.querySelector('input');

input.onfocus = function() {
    // alert("光标定位");
    if (this.value == "请输入您的长网址，如http://www.taobao.com") {
        this.value = '';

    }
    this.style.color = '#333';
}
input.onblur = function() {
    // alert('失去光标');
    if (this.value == '') {
        this.value = '请输入您的长网址，如http://www.taobao.com';
    }
    this.style.color = '#999';
}